home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-11-22 | 3.4 KB | 96 lines | [TEXT/ttxt] |
- .-
- help for ^kdensity^ (manual: ^[R] kdensity^)
- .-
-
- Univariate kernel density estimation
- ------------------------------------
-
- ^kdensity^ varname [weight] [^if^ exp] [^in^ range] [^,^ ^noden^sity
- ^nogr^aph ^g^enerate^(^newvarx newvard^) n(^#^) w^idth^(^#^)^
- [ ^bi^weight|^cos^ine|^ep^an|^gau^ss|^par^zen|^rec^tangle|^tri^angle]
- ^nor^mal ^stu^d^(^#^) at(^varx^) s^ymbol^(^...^) c^onnect^(^...^)^
- ^t^itle^(^string^)^ graph_options ]
-
-
- ^fweights^ and ^aweights^ are allowed; see help @weights@.
-
-
- Description
- -----------
-
- ^kdensity^ produces kernel density estimates and graphs the result.
-
-
- Options
- -------
-
- ^nodensity^ is included for compatibility with previous versions of Stata; you
- probably do not want to specify it. ^nodensity^ specifies that the graph
- should not be drawn on a density scale and/or that newvard in the ^gen()^
- option should not be returned on the density scale. You can convert the
- scale to the density scale (area under the curve to equal 1) using the
- scale factor saved in global macro ^S_4^.
-
- ^nograph^ suppresses drawing the graph. This option is often used in conjunction
- with ^generate()^.
-
- ^generate(^newvarx newvard^)^ stores the results of the estimation. newvard will
- contain the density estimate. newvarx will contain the points at which
- the density is estimated.
-
- ^n(^#^)^ specifies the number of points at which the density estimate is to be
- evaluated. The default is min(_N,50).
-
- ^width(^#^)^ specifies the halfwidth of the kernel, the width of the density
- window around each point. If ^width()^ is not specified, then the "optimal"
- width is used; see ^[R] kdensity^. In fact, for multimodal and highly
- skewed densities, the "optimal" is usually too wide and oversmooths the
- density.
-
- ^biweight^, ^cosine^, ..., ^triangle^ specify the kernel. (Actually, ^cosine^
- specifies the cosine trace as there is no such thing as a cosine kernel.)
- By default, ^epan^, meaning the Epanechnikov kernel, is used.
-
- ^normal^ requests that a normal density be overlaid on the density estimate for
- comparison.
-
- ^stud(^#^)^ specifies that a Student's t distribution with # degrees of freedom be
- overlaid on the density estimate for comparison.
-
- ^symbol(^...^)^ is ^graph, twoway^'s ^symbol()^ option for specifying the plotting
- symbol. The default is ^symbol(o)^; see help @graph@.
-
- ^at(^varx^)^ specifies a variable that contains the values at which the density
- should be estimated. ^at()^ allows you to more easily obtain density
- estimates for different variables or different subsamples of a variable
- and then overlay the estimated densities for comparison.
-
- ^symbol(^...^)^ is ^graph, twoway^'s ^symbol()^ option for specifying the plotting
- symbol. The default is ^symbol(o)^; see help @graph@.
-
- ^connect(^...^)^ is ^graph, twoway^'s ^connect()^ option for how points are connected.
- The default is ^connect(l)^; see help @graph@.
-
- ^title(^string^)^ is ^graph^'s ^title()^ option for specifying the title. The default
- is ^title(Kernel Density Estimate)^; see help @graph@.
-
- graph_options are any of the other options allowed by ^graph, twoway^; see help
- @graph@.
-
-
- Examples
- --------
-
- . ^kdensity length, xlabel ylabel^
-
- . ^kdensity length, xlabel ylabel w(20)^
-
- . ^kdensity weight, parzen nogr gen(x2 parzen)^
-
-
- Also see
- --------
-
- Manual: ^[R] kdensity^
- On-line: help for @graph@, @hist@
-